Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Discrete Data Page Changes
typeto indicate whether they came from the CTD cast file or the summary samples file.Backend Changes
/scriptsdirectory to help with fetching and compiling data for the frontend to display../scripts/refresh-discrete-data.sh: Fetch CTD cast data and discrete summary files fromhttps://rawdata-west.oceanobservatories.org/files/and subsequently parse them into files which can be read from the frontend:dashboard/public/discrete/ctd-cast-samples.csvanddashboard/public/discrete/summary-samples.csvrespectively, which have both been added to the S3 bucket. This script uses the following scripts in its implementation:./scripts/scripts/download_rawdata.py: Downloading subsets of the file tree fromhttps://rawdata-west.oceanobservatories.org/files/into a local directory. Includes a--flattenflag which will include the paths of the files in the file names themselves, allowing a flat downloaded directory. Takes a glob as its first command line argument../scripts/collect_discrete_ctd_cast_samples.py: Read.btlfiles from a directory and parse them into a single large CSV or (JSON file if specified) sample file which can be read from the frontend. This uses a lot of very tedious parsing code and a lot of hackery to determine which "Station" and "Target Asset" to associate samples with, considering the "Station"/"Location" are almost never specified in the same way in the bottle files. Claude Code was used to figure out most of the initial parsing and name mapping which would have taken forever otherwise../scripts/collect_discrete_summary_samples.py: Read discrete data.csvfiles from a directory and combine them into a single large CSV or (JSON file if specified) sample file which can be read from the frontend. This one doesn't have much for fancy logic, it mostly just concatenates the files and works in a similar way to the CTD cast collection script.